<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <style>
    body{
      font-family:Arial, Helvetica, sans-serif;
    }
    .modal{
      position:fixed;
      z-index:1;
      left:0;
      top:0;
      background-color:rgba(0, 0, 0, 0.4); /* Black w/ opacity */
    }

    .modal-content{
      background-color:#fefefe;
      margin:auto;
      padding:20px;
      border:1px solid #888;
      width:80%;
    }

    .close{
      color:#aaaaaa;
      float:right;
      font-size:28px;
      font-weight:bold;
    }

    .close:hover, .close:focus{
      color:#000;
      text-decoration:none;
      /*cursor:pointer;*/
    }
  </style>
</head>
<body>
<button id="myBtn">Open Modal</button>
<p> sdfsdf 士大夫</p>
<div id="myModal" class="modal">
  <div class="modal-content">
    <span class="close" onclick='modal.style.display="none"'>&times;</span>
    <p>Some text in the Modal..</p>
  </div>
</div>
<script>
  var modal=document.getElementById('myModal');
  window.onclick=function(e){
    if(e.target==modal) {
      modal.style.display="none";
    }
  }
</script>
</body>
</html>